﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomeProfileInTalentTypesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.HomeProfileInTalentTypesAdmin" %>
<owc:OwGrid ID="HomeProfileInTalentTypesGrid" runat="server" DataSourceID="HomeProfileInTalentTypesOds"
    SkinID="OwGridAdmin" AutoGenerateColumns="False" CellSpacing="0" GridLines="None"
    OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace" OwMessageDisplayControl="">
    <MasterTableView DataSourceID="HomeProfileInTalentTypesOds" DataKeyNames="OpenHomeProfilesInTalentTypesID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="OpenHomeProfilesInTalentTypesID" FilterControlAltText="Filter Name column"
                HeaderText='<%$ OwR: Code %>' SortExpression="Name" UniqueName="Name">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:HomeProfileDetails %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwOpenHomeProfileDetailsBLL.OwGetEntity((long?)Eval("OpenHomeProfileDetailID")).FullName%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:TalentType %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwTalentTypesBLL.OwGetEntity((long?)Eval("TalentTypeID")).Name %>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton ID="Editbt" CommandName="Edit" runat="server" ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <fieldset>
                    <legend>
                        <owc:OwR runat="server" OwText="InfoLabel"></owc:OwR></legend>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="HomeProfileDetails" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="HomeProfileDetailOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfileDetailsEntity"
                                    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfileDetailsBLL"
                                    UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="isDeleted" Type="Boolean" DefaultValue="false" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="openHomeProfileID" Type="Int64" />
                                        <asp:Parameter Name="firstNameID" Type="Int64" />
                                        <asp:Parameter Name="lastNameID" Type="Int64" />
                                        <asp:Parameter Name="isDefault" Type="Boolean" />
                                        <asp:Parameter Name="twelveYearCycleOfAnimalID" Type="Int32" />
                                        <asp:Parameter Name="fiveElementID" Type="Int32" />
                                        <asp:Parameter Name="hometownContinentID" Type="Int64" />
                                        <asp:Parameter Name="hometownCountryID" Type="Int64" />
                                        <asp:Parameter Name="hometownProvinceID" Type="Int64" />
                                        <asp:Parameter Name="hometownDistrictID" Type="Int64" />
                                        <asp:Parameter Name="hometownWardID" Type="Int64" />
                                        <asp:Parameter Name="zodiacID" Type="Int64" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox runat="server" ID="HomeProfileDetailCbb" DataSourceID="HomeProfileDetailOds"
                                    SkinID="OwComboBox" DataTextField="FullName" DataValueField="OpenHomeProfileDetailID"
                                    SelectedValue='<%# Bind("OpenHomeProfileDetailID") %>' EmptyMessage="<%$ owR:HomeProfileDetailsSelect %>">
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="HomeProfileDetailCbb"
                                    runat="server" ErrorMessage="<%$ OwR:HomeProfileDetailsSelect %>" SetFocusOnError="true"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="TalentType" />
                            </td>
                            <td>
                                <owc:OwObjectDataSource ID="TalentTypesOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwTalentTypesBLL"
                                    DataObjectTypeName="Micronet.OpenWeb.Entity.OwTalentTypesEntity" DeleteMethod="OwDelete"
                                    InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                    <SelectParameters>
                                        <asp:Parameter Name="parentID" Type="Int64" />
                                        <asp:Parameter Name="languageCode" Type="String" />
                                        <asp:Parameter Name="sortClause" Type="String" />
                                        <asp:Parameter Name="sortDirection" Type="String" />
                                        <asp:Parameter Name="startRowIndex" Type="Int32" />
                                        <asp:Parameter Name="maximumRows" Type="Int32" />
                                    </SelectParameters>
                                </owc:OwObjectDataSource>
                                <owc:OwComboBox runat="server" ID="TalentTypesCbb" DataSourceID="TalentTypesOds"
                                    SkinID="OwComboBox" DataTextField="Name" DataValueField="TalentTypeID" EmptyMessage="<%$ OwR:TalentTypeSelect %>"
                                    SelectedValue='<%# Bind("TalentTypeID")%>'>
                                </owc:OwComboBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="TalentTypesCbb"
                                    runat="server" ErrorMessage="<%$ OwR:TalentTypeSelect %>" SetFocusOnError="true"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <owc:OwButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    SkinID="OwButtonAdmin">
                                </owc:OwButton>
                                <owc:OwButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    SkinID="OwButtonAdmin" CommandName="Cancel">
                                </owc:OwButton>
                            </td>
                        </tr>
                    </table>
                </fieldset>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="HomeProfileInTalentTypesOds" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" EnablePaging="True" SelectCountMethod="OwGetByDynamicCount"
    TypeName="Micronet.OpenWeb.Com.BLL.OwOpenHomeProfilesInTalentTypesBLL" DataObjectTypeName="Micronet.OpenWeb.Entity.OwOpenHomeProfilesInTalentTypesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="talentTypeID" Type="Int64" />
        <asp:Parameter Name="openHomeProfileDetailID" Type="Int64" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
